package com.fmboy.MXH.nav.domain;

import lombok.Getter;

@Getter
public enum ErrorCode {
    SUCCESS(200, "成功"),
    INVALID_REQUEST(400, "注册失败，验证码错误!"),
    UNAUTHORIZED(401, "登陆失败"),
    //    409 注册失败，用户名已存在！
    CONFLICT(409, "注册失败，用户名已存在!"),
    FORBIDDEN(403, "禁止访问"),
    NOT_FOUND(404, "资源未找到"),
    //修改失败，此邮箱已被绑定
    EMAIL_ALREADY_BOUND(409, "修改失败，此邮箱已被绑定"),
    INTERNAL_ERROR(500, "服务器内部错误"),
    CAPTCHA_EXPIRED(600, "验证码已过期"),
    CAPTCHA_INVALID(601, "验证码无效"),
    PASSWORD_INCORRECT(700, "密码错误");

    private final int code;
    private final String message;

    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

}